Page({
  data:{
    queryData:{
       page:1,
       limit:10
     },
     dataList:[],
     id:''
  },
  onShow(){
   this.getArticle()
  },


// 编辑
 edit(ev){
  wx.reLaunch({
    url: `/pages/release/release?id=${ev.mark.id}&isShow=0`
  });
},

// 删除
async del(ev){
   console.log(ev.mark.id);
   await wx.http.get(`/user/delArticle?id=${ev.mark.id}`)
   this.getArticle()
},

  // 获取列表
 async getArticle(){
    const dataArticle = await wx.http.get('/user/myArticle',this.data.queryData)
    console.log(dataArticle);
    this.setData({dataList:dataArticle.data.data})
  }
})